$(function(){
    $.ajax({
        url: "http://search.twitter.com/search.json?q=nyorkspolice",
        dataType: 'jsonp',
        success: function(json_results){
            console.log(json_results);
            // Need to add UL on AJAX call or formatting of userlist is not displayed
            $('#twitList').append('<ul data-role="listview"></ul>');
            listItems = $('#twitList').find('ul');
            $.each(json_results.results, function(key) {
                html = '<img src="'+json_results.results[key].profile_image_url+'"/>';
                html += '<h3><a href="#">'+json_results.results[key].text+'</a></h3>';
                html += '<p>From: '+json_results.results[key].from_user+' Created: '+json_results.results[key].created_at+'</p>';
                listItems.append('<li>'+html+'</li>');
            });
            // Need to refresh list after AJAX call
            $('#twitList ul').listview();
        }
    });
})